﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CMSApplication.Models;
using MarkdownSharp;

namespace CMSApplication.Controllers
{
    public class SitesController : Controller
    {
        //
        // GET: /Sites/

        public ActionResult Index(string site)
        {
            /*
            using (var db = new CMSContext())
            {
                Site sites = getSite(site);
                Markdown markdown = new Markdown();
                var html = markdown.Transform(sites.);
                
                sites.site_content = html;

                return View(sites);
            }
            */

            return View();
        }

        public ActionResult Tester(string pagename)
        {
            return View();
        }

        /*
        private Site getSite(string site)
        {
            
            using (var db = new CMSContext())
            {
                var sites = (from s in db.Sites
                             where s.site_url== site
                             select s);
                return sites.Single();
            }
        }
        */

    }
}
